package com.jt.www.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jt.www.domain.enums.pc.MarketerChannelCodeEnum;
import com.jt.www.domain.po.OfflineOrder;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 线下录入保存
 * Created by shaoyn on 2020/05/22.
 */
public class OfflineOrderInputDTO {

    @ApiModelProperty(value = "主键 更新时必传")
    private Long id;

    @ApiModelProperty(value = "00:统保示范项目  01:教育区域统保业务  02:教育延伸业务  03:教育衍生业务  04:其他教育保险业务")
    private String offlineType;

    @ApiModelProperty(value = "业务归属-分公司编码")
    private String branchCode;

    @ApiModelProperty(value = "业务归属-分公司名称")
    private String branchName;

    @ApiModelProperty(value = "出单公司编号")
    private String insCompanyCode;

    @ApiModelProperty(value = "出单公司名称")
    private String insCompanyName;

    @ApiModelProperty(value = "产品编号")
    private String productCode;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "项目编号")
    private String projectCode;

    @ApiModelProperty(value = "项目名称")
    private String projectName;

    @ApiModelProperty(value = "省编码")
    private String provinceCode;

    @ApiModelProperty(value = "省名称")
    private String provinceName;

    @ApiModelProperty(value = "市编码")
    private String cityCode;

    @ApiModelProperty(value = "市名称")
    private String cityName;

    @ApiModelProperty(value = "区编码")
    private String countyCode;

    @ApiModelProperty(value = "区名称")
    private String countyName;

    @ApiModelProperty(value = "计算佣金的营销人员usercode")
    private String marketerUserCode;

    @ApiModelProperty(value = "计算佣金的营销人员工号")
    private String marketerNo;

    @ApiModelProperty(value = "计算佣金的营销人员姓名")
    private String marketerName;

    @ApiModelProperty(value = "计算佣金的营销人员分支机构编码")
    private String marketerBranchCode;

    @ApiModelProperty(value = "计算佣金的营销人员分支机构名称")
    private String marketerBranchName;

    @ApiModelProperty(value = "计算佣金的营销人员渠道编码")
    private String marketerChannelCode;

    @ApiModelProperty(value = "计算佣金的营销人员渠道名称")
    private String marketerChannelName;

    @ApiModelProperty(value = "险种责任限额对应json")
    private String riskDutyLimit;

    @ApiModelProperty(value = "保单导入的文件json")
    private String policyFile;

    @ApiModelProperty(value = "附件文件json")
    private String attachedFile;

    @ApiModelProperty(value = "产品的用户类型 00-企业; 01-自然人")
    private String userType;

    @ApiModelProperty(value = "录入审核状态 1：待审核 2：审核退回  3：审核通过")
    private String auditStatus;

    @ApiModelProperty(value = "操作人编码")
    private String operatorNo;

    @ApiModelProperty(value = "操作人名称")
    private String operatorName;

    @ApiModelProperty(value = "操作人联系电话")
    private String operatorPhone;

    @ApiModelProperty(value = "操作人分支机构编码")
    private String operatorBranchCode;

    @ApiModelProperty(value = "操作人分支机构名称")
    private String operatorBranchName;

    @ApiModelProperty(value = "是否倒签：1-是；0-否")
    private Byte backlog;

    @ApiModelProperty(value = "是否跨期：1-是；0-否")
    private Byte crossTerm;

    @ApiModelProperty(value = "倒签原因：1-是；0-否")
    private String backlogReason;

    @ApiModelProperty(value = "收入确认时间点")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date incomeConfirmTime;

    @ApiModelProperty(value = "收入佐证原因")
    private String evidenceReason;

    @ApiModelProperty(value = "其他原因")
    private String otherReason;

    @ApiModelProperty(value = "佐证文件json")
    private String evidenceFile;




    public OfflineOrder changeToOfflineOrder() {
        OfflineOrder offlineOrder = new OfflineOrder();
        offlineOrder.setId(this.id);
        offlineOrder.setOfflineType(this.offlineType);
        offlineOrder.setBranchCode(this.branchCode);
        offlineOrder.setBranchName(this.branchName);
        offlineOrder.setInsCompanyCode(this.insCompanyCode);
        offlineOrder.setInsCompanyName(this.insCompanyName);
        offlineOrder.setProductCode(this.productCode);
        offlineOrder.setProductName(this.productName);
        offlineOrder.setProjectCode(this.projectCode);
        offlineOrder.setProjectName(this.projectName);
        offlineOrder.setProvinceCode(this.provinceCode);
        offlineOrder.setProvinceName(this.provinceName);
        offlineOrder.setCityCode(this.cityCode);
        offlineOrder.setCityName(this.cityName);
        offlineOrder.setCountyCode(this.countyCode);
        offlineOrder.setCountyName(this.countyName);
        offlineOrder.setMarketerUserCode(this.marketerUserCode);
        offlineOrder.setMarketerNo(this.marketerNo);
        offlineOrder.setMarketerName(this.marketerName);
        offlineOrder.setMarketerBranchCode(this.marketerBranchCode);
        offlineOrder.setMarketerBranchName(this.marketerBranchName);
        offlineOrder.setMarketerChannelCode(MarketerChannelCodeEnum.getNewCodeByCode(this.marketerChannelCode));
        offlineOrder.setMarketerChannelName(this.marketerChannelName);

        offlineOrder.setUserType(this.userType);
        offlineOrder.setRiskDutyLimit(this.riskDutyLimit);
        offlineOrder.setPolicyFile(this.policyFile);
        offlineOrder.setAttachedFile(this.attachedFile);
        offlineOrder.setAuditStatus(this.auditStatus);
        offlineOrder.setOperatorNo(this.operatorNo);
        offlineOrder.setOperatorName(this.operatorName);
        offlineOrder.setOperatorPhone(this.operatorPhone);
        offlineOrder.setOperatorBranchCode(this.operatorBranchCode);
        offlineOrder.setOperatorBranchName(this.operatorBranchName);
        offlineOrder.setBackLog(this.backlog);
        offlineOrder.setCrossTerm(this.crossTerm);
        offlineOrder.setBacklogReason(this.backlogReason);
        offlineOrder.setIncomeConfirmTime(this.incomeConfirmTime);
        offlineOrder.setEvidenceFile(this.evidenceFile);
        offlineOrder.setOtherReason(this.otherReason);
        offlineOrder.setEvidenceReason(this.evidenceReason);
        return offlineOrder;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOfflineType() {
        return offlineType;
    }

    public void setOfflineType(String offlineType) {
        this.offlineType = offlineType;
    }

    public String getBranchCode() {
        return branchCode;
    }

    public void setBranchCode(String branchCode) {
        this.branchCode = branchCode;
    }

    public String getBranchName() {
        return branchName;
    }

    public void setBranchName(String branchName) {
        this.branchName = branchName;
    }

    public String getInsCompanyCode() {
        return insCompanyCode;
    }

    public void setInsCompanyCode(String insCompanyCode) {
        this.insCompanyCode = insCompanyCode;
    }

    public String getInsCompanyName() {
        return insCompanyName;
    }

    public void setInsCompanyName(String insCompanyName) {
        this.insCompanyName = insCompanyName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getCountyCode() {
        return countyCode;
    }

    public void setCountyCode(String countyCode) {
        this.countyCode = countyCode;
    }

    public String getCountyName() {
        return countyName;
    }

    public void setCountyName(String countyName) {
        this.countyName = countyName;
    }

    public String getMarketerUserCode() {
        return marketerUserCode;
    }

    public void setMarketerUserCode(String marketerUserCode) {
        this.marketerUserCode = marketerUserCode;
    }

    public String getMarketerNo() {
        return marketerNo;
    }

    public void setMarketerNo(String marketerNo) {
        this.marketerNo = marketerNo;
    }

    public String getMarketerName() {
        return marketerName;
    }

    public void setMarketerName(String marketerName) {
        this.marketerName = marketerName;
    }

    public String getMarketerBranchCode() {
        return marketerBranchCode;
    }

    public void setMarketerBranchCode(String marketerBranchCode) {
        this.marketerBranchCode = marketerBranchCode;
    }

    public String getMarketerBranchName() {
        return marketerBranchName;
    }

    public void setMarketerBranchName(String marketerBranchName) {
        this.marketerBranchName = marketerBranchName;
    }

    public String getMarketerChannelCode() {
        return marketerChannelCode;
    }

    public void setMarketerChannelCode(String marketerChannelCode) {
        this.marketerChannelCode = marketerChannelCode;
    }

    public String getMarketerChannelName() {
        return marketerChannelName;
    }

    public void setMarketerChannelName(String marketerChannelName) {
        this.marketerChannelName = marketerChannelName;
    }

    public String getRiskDutyLimit() {
        return riskDutyLimit;
    }

    public void setRiskDutyLimit(String riskDutyLimit) {
        this.riskDutyLimit = riskDutyLimit;
    }

    public String getPolicyFile() {
        return policyFile;
    }

    public void setPolicyFile(String policyFile) {
        this.policyFile = policyFile;
    }

    public String getAttachedFile() {
        return attachedFile;
    }

    public void setAttachedFile(String attachedFile) {
        this.attachedFile = attachedFile;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getOperatorNo() {
        return operatorNo;
    }

    public void setOperatorNo(String operatorNo) {
        this.operatorNo = operatorNo;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }

    public String getOperatorPhone() {
        return operatorPhone;
    }

    public void setOperatorPhone(String operatorPhone) {
        this.operatorPhone = operatorPhone;
    }

    public String getOperatorBranchCode() {
        return operatorBranchCode;
    }

    public void setOperatorBranchCode(String operatorBranchCode) {
        this.operatorBranchCode = operatorBranchCode;
    }

    public String getOperatorBranchName() {
        return operatorBranchName;
    }

    public void setOperatorBranchName(String operatorBranchName) {
        this.operatorBranchName = operatorBranchName;
    }

    public Byte getBacklog() {
        return backlog;
    }

    public void setBacklog(Byte backlog) {
        this.backlog = backlog;
    }

    public Byte getCrossTerm() {
        return crossTerm;
    }

    public void setCrossTerm(Byte crossTerm) {
        this.crossTerm = crossTerm;
    }

    public String getBacklogReason() {
        return backlogReason;
    }

    public void setBacklogReason(String backlogReason) {
        this.backlogReason = backlogReason;
    }

    public Date getIncomeConfirmTime() {
        return incomeConfirmTime;
    }

    public void setIncomeConfirmTime(Date incomeConfirmTime) {
        this.incomeConfirmTime = incomeConfirmTime;
    }

    public String getEvidenceReason() {
        return evidenceReason;
    }

    public void setEvidenceReason(String evidenceReason) {
        this.evidenceReason = evidenceReason;
    }

    public String getOtherReason() {
        return otherReason;
    }

    public void setOtherReason(String otherReason) {
        this.otherReason = otherReason;
    }

    public String getEvidenceFile() {
        return evidenceFile;
    }

    public void setEvidenceFile(String evidenceFile) {
        this.evidenceFile = evidenceFile;
    }
}
